package com.books.service.book.impl;

import com.books.mapper.book.BookTypeMapper;
import com.books.model.entity.book.BookType;
import com.books.service.book.IBookTyoeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

@Service
@Transactional
public class BookTypeServiceImpl implements IBookTyoeService {

    @Autowired(required = false)
    private BookTypeMapper bookTypeMapper;

    @Override
    public List<BookType> findAll() {

        return  bookTypeMapper.findAll();
    }

    @Override
    public BookType findById(int id) {
        return bookTypeMapper.findById(id);
    }
}
